package work20241206_chap7.n_demo11;

/**
 * @author zdl
 * @date 2024/12/5
 */
public class Demo {
    public static void main(String[] args) {
        Shape shape = new Circle(3);
        shape.area();
        shape.girth();

        Shape shape1 = new Rect(2,4);
        shape1.area();
        shape1.girth();

        Shape shape2 = new Square(3,3);
        shape2.area();
        shape2.girth();
        System.out.println();
        Circle circle = new Circle(5);
        Rect rect = new Rect(1,2);
        Square square = new Square(2,2);
        Shape[] shapes = new Shape[3];
        shapes[0] = circle;
        shapes[1] = rect;
        shapes[2] = square;
        A a = new A();
        a.test(shapes);

    }
}
